<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div contenteditable="true" style="box-sizing: border-box;padding:10px;border:1px solid #999;min-height: 400px;width: 100%;">
        <h1>我是标题</h1>
    </div>
    <!-- 文本 -->
    <textarea contenteditable="true" name="" id="" cols="30" rows="10">
        h1    dsjkjkdskjsdjk
        <h3>dsdsd</h3>
    </textarea>
</body>
</html>